package com.yangye.otherdemo.callabledemo;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * @author yangye
 * @date 2019/7/29
 */
public class CallableDemo {

	public static void main(String[] args) throws ExecutionException, InterruptedException {
		MyCallable mc = new MyCallable();
		FutureTask ft = new FutureTask(mc);
		Thread t = new Thread(ft);
		t.start();
		System.out.println(ft.get());
		System.out.println("结束");
	}

}
